package com.inibb.app.po.admin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.inibb.app.po.BaseEntity;
import com.inibb.app.po.DomainDefinition;





@Entity
@Table(name = "O_REGION")
public class Region extends BaseEntity{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer id;
	
	private String regCode;
	
	private String regName;
	
	private String activeFlag;
	
	private String selected;

	@Transient
	public String getSelected() {
		return selected;
	}
	public void setSelected(String selected) {
		this.selected = selected;
	}
	/**
	 * Gets id (primary key).
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID")
	public Integer getId() {
		return id;
	}
	@Transient
	public String getIdStr(){
		return String.valueOf(id);
	}

	public void setId(Integer id) {
		this.id = id;
	}
	
    @NotNull
    @Size(min = 1, max = DomainDefinition.NAME_FIELD_LENGTH)
	@Column(name = "RGN_CD", length=DomainDefinition.CODE_FIELD_LENGTH, unique = false, nullable = true)
	public String getRegCode() {
		return regCode;
	}

	public void setRegCode(String regCode) {
		this.regCode = regCode;
	}
	
    @NotNull
    @Size(min = 1, max = DomainDefinition.NAME_FIELD_LENGTH)
	@Column(name = "RGN_NM", length=DomainDefinition.NAME_FIELD_LENGTH, unique = false, nullable = true)
	public String getRegName() {
		return regName;
	}

	public void setRegName(String regName) {
		this.regName = regName;
	}

	
    @NotNull
	@Column(name = "ACTV_FLG", length=DomainDefinition.STATUS_LENGTH, unique = false, nullable = false)
	public String getActiveFlag() {
		return activeFlag;
	}
	public void setActiveFlag(String activeFlag) {
		this.activeFlag = activeFlag;
	}
	
	
}
